/*
 * @Author: zheguo 3188606474@qq.com
 * @Date: 2024-04-16 23:16:49
 * @LastEditors: zheguo 3188606474@qq.com
 * @LastEditTime: 2024-04-17 10:30:30
 * @FilePath: \ProjectAction\projectOne\myapp\src\store\Swiper.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import axios from 'axios'

const useSwiper = defineStore('useSwiper_list', () => {

    const datalist = ref(["手机", "电视", "家电", "笔记本 平板", "出行 穿戴", "耳机 音响", "健康 儿童", "生活 箱包", "智能 路由器", "电源 配件"])
    const swiperlist = ref([])
    const getSwiperList = async () => {

        await axios.get("../json/swiper.json").then(res => {
            swiperlist.value = res.data.data
            // console.log(res.data)
        })
    }

    return {
        getSwiperList,
        datalist,
        swiperlist
    }
})

export default useSwiper